<?php

namespace app\service\admin;

use app\db\admin\D_setting;

class S_setting
{
    public $d_setting;

    public function __construct()
    {
        $this->d_setting = new D_setting();
    }

    /**
     * 创建数据[批量]
     * @param string $paramObj
     * @return array
     */
    public function storeBatch($paramObj=""){
        return $this->d_setting->storeBatch($paramObj);
    }

    /**
     * 获取数据详情 by itemKey
     * @param string $paramObj
     * @return array
     */
    public function infoByItemKey($paramObj=""){
        return $this->d_setting->infoByItemKey($paramObj);
    }

    /**
     * 删除数据
     * @param string $paramObj
     * @return array
     */
    public function deleteByPid($paramObj=""){
        return $this->d_setting->deleteByPid($paramObj);
    }

    /**
     * 创建数据
     * @param string $paramObj
     * @return array
     */
    public function record($paramObj=""){
        return $this->d_setting->record($paramObj);
    }

    /**
     * 获取模块对应设置
     * @param string $paramObj
     * @return array
     */
    public function getSetting($paramObj=""){
        return $this->d_setting->getSetting($paramObj);
    }

    public function __call($name,$arguments)
    {
        return recordLogMsgLevelTwo(app("errorLevel")::E_WARNING,app("errorCode")::UNDEFINED_METHOD,lang("sys.noMethodDefined"),$name,$arguments);
    }
}